home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
pibt40s5.arc
/
SETDEFAU.MOD
< prev
next >
Wrap
Text File
|
1987-09-30
|
41KB
|
1,064 lines
(*----------------------------------------------------------------------*)
(* Set_Defaults --- Set Default Communications Parameters *)
(*----------------------------------------------------------------------*)
PROCEDURE Set_Defaults;
(*----------------------------------------------------------------------*)
(* *)
(* Procedure: Set_Defaults *)
(* *)
(* Purpose: Set default communications parameters *)
(* *)
(* Calling Sequence: *)
(* *)
(* Set_Defaults; *)
(* *)
(* Calls: None *)
(* *)
(* Remarks: Note that defaults for color-related variables are *)
(* set in PibTerm so that error messages will appear *)
(* in a readable form. *)
(* *)
(*----------------------------------------------------------------------*)
VAR
I: INTEGER;
J: INTEGER;
F: FILE;
CONST
Pibterm_Version_Def = '4.0.2 Production.' (* Version no. of PibTerm *);
Pibterm_Date_Def = 'Released September 30, 1987.' (* Date of PibTerm *);
Test_Version_Def = FALSE (* If a test version *);
(* STRUCTURED *) CONST
(* Script conversion table *)
PibTerm_Com_Table_2 : ARRAY[0..No_Of_PibTerm_Commands_Minus_One]
OF PibTerm_Command_Type =
( AddCommandSy, AddLFSy, AlarmSy, AreaCodeSy,
BreakSy, CallSy, CaptureSy, CaseSy,
ChDirSy, ClearSy, CloseSy, ClrEolSy,
CommFlushSy, DeclareSy, DelaySy, DelLineSy,
DialSy, DoCaseSy, DosSy, EchoSy,
EditSy, ElseSy, ElseIfSy, EndCaseSy,
EndDoCaseSy, EndForSy, EndIfSy, EndProcSy,
EndWhileSy, ExecuteSy, ExeNewSy, ExitSy,
ExitAllSy, FastCSy, FileSy, ForSy,
GetDirSy,
GetParamSy, GetVarSy, GossipSy, GoToSy,
GoToXYSy, HangUpSy, HostSy, IfConSy,
IfDialSy, IfEofSy, IfExistsSy, IfFoundSy,
IfLocStrSy, IfOkSy, IfOpSy, IfRemStrSy,
ImportSy, InfoSy, InputSy, InsLineSy,
KeyDefSy, KeyFlushSy, KeySendSy, KeySy,
LabelSy, LogSy, MenuSy, MessageSy,
MuteSy, OpenSy, ParamSy, PImportSy,
ProcedureSy, QuitSy, ReadSy, ReadLnSy,
ReceiveSy, ReDialSy, RepeatSy, ResetSy,
ReturnSy, RInputSy, ScriptSy, SDumpSy,
SendSy, SetSy, SetParamSy, SetVarSy,
STextSy, SuspendSy, TextSy, TimersSy,
TranslateSy, UntilSy, ViewSy, WaitSy,
WaitCountSy, WaitListSy, WaitQuietSy, WaitStrSy,
WaitTimeSy, WhenSy, WhenDropSy, WhenListSy,
WhereXYSy, WhileSy, WriteSy, WriteLnSy,
WriteLogSy, ZapVarSy, Bad_Command, Null_Command
);
Terminal_Type_List_2 : ARRAY[0..NumberTerminalTypes] OF Terminal_Type =
( Dumb, VT52, Ansi, VT100,
Gossip, HostMode, TEK4010, ADM3a,
ADM5, TV925, User1, User2,
User3, User4, User5 );
(* Terminal names *)
Terminal_Name_List_2 : ARRAY[0..NumberTerminalTypes] OF STRING[7] =
( 'Dumb', 'VT52', 'ANSI', 'VT100',
'Gossip', 'Host', 'TEK4010', 'ADM3A',
'ADM5', 'TV925', 'User1', 'User2',
'User3', 'User4', 'User5' );
(* Command-key definitions *)
Alt_Let_Set_Defs: SET OF BYTE =
[ Alt_A, Alt_B, Alt_C, Alt_D, Alt_E, Alt_F, Alt_G,
Alt_H, Alt_I, Alt_J, Alt_K, Alt_L, Alt_M, Alt_N,
Alt_O, Alt_P, Alt_Q, Alt_R, Alt_S, Alt_T, Alt_U,
Alt_V, Alt_W, Alt_X, Alt_Y, Alt_Z ];
DTransfers : ARRAY[ 1 .. Max_Transfer_Types ] OF Transfer_Type
= ( Ascii, Xmodem_Chk, Xmodem_Crc, Kermit, Telink,
Modem7_Chk, Modem7_CRC, Xmodem_1K, Xmodem_1KG,
Ymodem_Batch, Ymodem_G,
Zmodem, WXmodem, Rlink, SeaLink, YTerm,
PUser1, PUser2, PUser3, PUser4, PUser5, None );
DTransfer_Name_List : ARRAY[ 1 .. Max_Transfer_Types ] OF String12
= ( ' Ascii', ' Xmodem Chk', ' Xmodem CRC',
' Kermit', ' Telink', ' Modem7 Chk',
' Modem7 CRC', ' Xmodem 1K', ' Xmodem 1Kg',
'Ymodem Batch', ' Ymodem g', ' Zmodem',
' WXmodem', ' Rlink', ' SEALink',
' YTerm', ' ', ' ',
' ', ' ', ' ',
' None' );
DTrans_Type_Name : ARRAY[ Transfer_Type ] OF Char_2 =
( 'AS', 'XK', 'XC', 'KE', 'TE', 'MK', 'M7',
'X1', 'XG', 'YB', 'YG', 'ZM', 'WX', 'RL',
'SL', 'YT', ' ', ' ', ' ', ' ', ' ',
'NO' );
(* STRUCTURED *) CONST
Def_Funk_Bases: ARRAY[1..4] OF BYTE
= ( 58, 83, 93, 103 );
Def_Keypad_Nos: ARRAY[0..12] OF BYTE
= ( 12, 9, 10, 11, 5, 6, 7, 1, 2, 3, 13, 4, 8 );
Def_Number_Nos: ARRAY[0..12] OF BYTE
= ( 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 11, 12 );
Def_Ctrl_Keys : ARRAY[0..12] OF BYTE
= ( 165, 117, 164, 118, 115, 162, 116,
119, 160, 132, 166, 161, 163 );
Def_Misc_Keys : ARRAY[1..No_Misc_Keys] OF BYTE
= ( 28, 255, 55, 114, 171 );
(*----------------------------------------------------------------------*)
(* IToS --- Convert integer to string *)
(*----------------------------------------------------------------------*)
FUNCTION IToS( I: INTEGER ) : ShortStr;
VAR
S: STRING[10];
BEGIN (* IToS *)
STR( I , S );
IToS := S;
END (* IToS *);
(*----------------------------------------------------------------------*)
BEGIN (* Set_Defaults *)
(* Set version number *)
PibTerm_Version := Pibterm_Version_Def;
PibTerm_Date := Pibterm_Date_Def;
Test_Version := Test_Version_Def;
(* Assume text mode from *)
(* current system setting. *)
CASE Current_Video_Mode OF
0, 2, 7 : Text_Mode := BW80;
ELSE Text_Mode := C80;
END (* CASE *);
TextMode( Text_Mode );
(* Set screen sizes *)
Get_Screen_Size( Max_Screen_Line , Max_Screen_Col );
Wrap_Screen_Col := Max_Screen_Col;
(* Set window sizes *)
Upper_Left_Column := 1;
Upper_Left_Row := 1;
Lower_Right_Column := Max_Screen_Col;
Lower_Right_Row := Max_Screen_Line;
(* Get session start time *)
Session_Start_Time := TimeOfDay;
Dialing_Start_Time := Session_Start_Time;
(* Clear screen *)
Scroll( 1, Max_Screen_Line, 1, Max_Screen_Col, 0, White, Black );
MoveToXY( 1 , 1 );
(* Select color/mono screen *)
Get_Screen_Address( Actual_Screen );
(* Set colors as black and white *)
Set_Global_Colors( White, Black );
Set_Border_Color ( Black );
ForeGround_Color := White;
BackGround_Color := Black;
Border_Color := Black;
Menu_Text_Color := White;
Menu_Text_Color_2 := White;
Menu_Frame_Color := White;
Menu_Title_Color := White;
(* Set VT100 colors *)
VT100_ForeGround_Color := LightGray;
VT100_BackGround_Color := Black;
VT100_Border_Color := Black;
VT100_Underline_Color := Blue;
VT100_Bold_Color := White;
(* No LEDs lit in VT100 mode *)
VT100_Led_Vector[1] := FALSE;
VT100_Led_Vector[2] := FALSE;
VT100_Led_Vector[3] := FALSE;
VT100_Led_Vector[4] := FALSE;
(* Set saved screen pointer *)
Saved_Screen := NIL;
(* Silent mode OFF to start *)
Silent_Mode := FALSE;
(* Local echo starts at OFF *)
Local_Echo := FALSE;
(* Gossip mode starts at OFF *)
Gossip_Mode_On := FALSE;
Saved_Gossip_Term := Dumb;
(* Host Mode starts at OFF *)
Host_Mode := FALSE;
(* Phone number to dial *)
Phone_Number := '';
(* Last column not hit yet *)
Last_Column_Hit := FALSE;
(* Wrap long lines *)
Auto_Wrap_Mode := TRUE;
(* Insertion mode off *)
Insertion_Mode := FALSE;
(* New_Line mode not in effect *)
New_Line := FALSE;
(* No blinking in effect *)
Blinking_On := FALSE;
(* No script file being used *)
Script_File_Mode := FALSE;
(* No script being learned either *)
Script_Learn_Mode := FALSE;
(* Do XON/XOFF checking *)
Do_Xon_Xoff_Checks := TRUE;
(* No WHENs in use *)
Script_When_Text := '';
Script_When_Reply_Text := '';
Script_When_Save := '';
Script_When_Drop_Text := '';
When_Mode := FALSE;
When_Drop_Mode := FALSE;
Script_When_Count := 0;
(* No WAITs in use *)
Script_Wait_Save := '';
Script_Wait_Found := FALSE;
WaitString_Mode := FALSE;
Read_In_Script := FALSE;
Really_Wait_String := FALSE;
Script_Suspend_Time := 0.0;
Script_Default_Wait_Time := 30;
Script_Wait_Count := 0;
Script_Wait_Char_Count := 0;
WaitQuiet_Mode := FALSE;
WaitCount_Mode := FALSE;
Script_Wait_Generated := FALSE;
Script_WaitQuiet_Time := 0.0;
(* Count of WaitStrings generated *)
Script_Learn_Line_Count := 0;
(* No script to start *)
Script_Buffer := NIL;
Script_Buffer_Size := 0;
Script_String := '';
Script_String_2 := '';
Script_Count := 0;
Script_Stack_Depth := 0;
Script_Call_Depth := 0;
Script_IO_Error := 0;
Script_Command_Key_Mode := FALSE;
Script_Parameter_Marker := '%';
Script_Learn_Buffer_Size := 15;
Script_Learn_Lines := 1;
Script_Search_Order := Dir_Then_Lib;
FOR I := 0 TO No_Of_PibTerm_Commands_Minus_One DO
PibTerm_Command_Table_2[I] := PibTerm_Com_Table_2[I];
(* No user-defined commands yet *)
Script_New_Command_Count := 0;
(* No declared script variables yet, *)
(* but leave space for special hidden *)
(* variables. *)
Script_Variable_Count := 2;
Script_Parameter_Count := 0;
Script_Parameter_Got := 0;
Prev_Script_Variables := NIL;
(* No procedures yet either *)
Proc_Parameters := NIL;
Proc_Parameter_Count := 0;
Proc_Parameter_Got := 0;
(* Set date and time display types *)
Date_Format := YMD_Style;
Time_Format := Military_Time;
(* Carrier not set high by default *)
Modem_Carrier_High := FALSE;
(* Default communications parameters *)
Data_Bits := 8;
Parity := 'N';
Stop_Bits := 1;
Baud_Rate := 2400;
Comm_Port := 1;
Async_Do_CTS := FALSE;
Async_Do_DSR := FALSE;
Async_Hard_Wired_On := FALSE;
Async_Break_Length := 100;
Async_Do_XonXoff := TRUE;
Async_Buffer_Length := 4096;
Async_OBuffer_Length := 1132;
(* Port addresses of each com port *)
Default_Com_Base[1] := COM1_Base;
Default_Com_Base[2] := COM2_Base;
Default_Com_Base[3] := COM3_Base;
Default_Com_Base[4] := COM4_Base;
(* IRQ line for each port *)
Default_Com_Irq [1] := COM1_Irq;
Default_Com_Irq [2] := COM2_Irq;
Default_Com_Irq [3] := COM3_Irq;
Default_Com_Irq [4] := COM4_Irq;
(* RS232 base addresses of each port *)
Default_Com_RS232[1] := COM1_RS232;
Default_Com_RS232[2] := COM2_RS232;
Default_Com_RS232[3] := COM3_RS232;
Default_Com_RS232[4] := COM4_RS232;
Drop_Dtr_At_End := FALSE;
Close_Comm_For_Dos := FALSE;
Current_Saved_Screen := 0;
FOR I := 1 TO Max_Saved_Screen DO
Saved_Screen_List[I] := NIL;
Menu_Explode_Mode := FALSE;
Menu_Beep_Mode := TRUE;
BS_Char := CHR( BS );
Ctrl_BS_Char := CHR( DEL );
Write_Screen_Memory := FALSE;
Write_Screen_Memory_Par := TRUE;
Terminal_To_Emulate := Dumb;
User_Term_Name[1] := 'USER1.TDE';
User_Term_Name[2] := 'USER2.TDE';
User_Term_Name[3] := 'USER3.TDE';
User_Term_Name[4] := 'USER4.TDE';
User_Term_Name[5] := 'USER5.TDE';
Gossip_Window_Size := 18;
Gossip_Line_Mode := FALSE;
Add_LF := FALSE;
Capture_On := FALSE;
Exact_Capture := TRUE;
Printer_On := FALSE;
Translate_On := FALSE;
Play_Music_On := TRUE;
Silent_Mode := FALSE;
Local_Echo := FALSE;
Alter_Baud_Rate := TRUE;
Modem_Init := 'ATZ|ATX1|';
Modem_Dial := 'ATDT';
Modem_Dial_End := '|';
Modem_Connect := 'CONNECT';
Modem_No_Carrier := 'NO CARRIER';
Modem_Busy := 'BUSY';
Modem_Time_Out := 60.0;
Modem_Redial_Delay := 45.0;
Modem_Escape := '+++';
Modem_Escape_Time := 1500;
Modem_Hang_Up := 'ATH0|';
Modem_Answer := 'ATA|';
Modem_Host_Set := 'ATZ|~ATX1|~ATS0=1|';
Modem_Host_UnSet := 'ATZ|~ATX1|~ATS0=0|';
Modem_Command_Delay := 10;
Modem_Ring := 'RING';
Break_Length := 50;
Hard_Wired := FALSE;
Host_Auto_Baud := TRUE;
Use_Short_Dial_Menu := FALSE;
Max_Write_Buffer := 2048;
Default_Transfer_Type := Xmodem_Chk;
Default_Prefix := ' ';
Default_Postfix := ' ';
Dialing_Dir_Size := 200;
Dialing_Dir_Size_Max := 200;
Phone_Entry_Page := 1;
Phone_Entry_Number := -1;
Phone_Number := '';
Dialing_Page := 1;
WITH Phone_Entry_Data DO
BEGIN
FOR I := 1 TO 25 Do
Phone_Name[I] := ' ';
FOR I := 1 TO 15 DO
Phone_Number[I] := ' ';
END;
FK_CR := '|';
FK_Delay := '~';
FK_Wait_For := '`';
FK_Ctrl_Mark := '^';
FK_Script_Ch := '@';
FK_Delay_Time := 10;
Screen_Dump_Name := '';
Graphics_Dump_Name := '';
Download_Dir_Path := '';
Upload_Dir_Path := '';
Script_Path := '';
Function_Key_Path := '';
Host_Mode_Upload := '';
Host_Mode_Download := '';
Host_Mode_Blank_Time := 180.0;
Show_Status_Line := TRUE;
Show_Status_Time := FALSE;
Do_Status_Line := FALSE;
Do_Status_Time := FALSE;
Status_ForeGround_Color := Black;
Status_BackGround_Color := White;
Reverse_Status_Colors := TRUE;
GMT_Difference := 0;
Transfer_Bells := 6;
Downsize_Ymodem := TRUE;
Use_Ymodem_Header := FALSE;
Use_Block_Zero := TRUE;
CompuServe_B_On := FALSE;
Mahoney_On := TRUE;
YTerm_On := FALSE;
YTerm_Mode := 'B';
Exploding_Menus := FALSE;
Check_CTS := TRUE;
Check_DSR := FALSE;
Print_Spooling := FALSE;
(* Set retrace based upon display type *)
EGA_Present := EGA_Installed;
Wait_For_Retrace_Par := NOT ( EGA_Present OR ( Text_Mode = 7 ) );
Wait_For_Retrace := Wait_For_Retrace_Par;
(* Not an ATI EGA Wonder card *)
ATI_Ega_Wonder := FALSE;
(* Set empty review buffer *)
Review_On := FALSE;
Max_Review_Length := 0;
Review_Buffer := NIL;
Review_Head := 0;
Review_Tail := 0;
Review_Line := '';
(* Define command key set *)
Alt_Let_Set := Alt_Let_Set_Defs;
(* Initial translate maps each *)
(* character into itself. *)
(* Also, no key strings yet *)
(* defined. *)
FOR I := 0 TO 255 DO
BEGIN
TrTab[ CHR( I ) ] := CHR( I );
Key_Definitions[I].Def := NIL;
Key_Definitions[I].Name := '';
Keypad_Key_Index[ I ] := 0;
END;
(* Initialize command table *)
FOR I := 0 TO 255 DO
Pibterm_Command_Table[I] := Null_Command;
PibTerm_Command_Table[Alt_A] := EditSy;
PibTerm_Command_Table[Alt_B] := BreakSy;
PibTerm_Command_Table[Alt_C] := ClearSy;
PibTerm_Command_Table[Alt_D] := DialSy;
PibTerm_Command_Table[Alt_E] := EchoSy;
PibTerm_Command_Table[Alt_F] := FileSy;
PibTerm_Command_Table[Alt_G] := ScriptSy;
PibTerm_Command_Table[Alt_H] := HangUpSy;
PibTerm_Command_Table[Alt_I] := InfoSy;
PibTerm_Command_Table[Alt_J] := DosSy;
PibTerm_Command_Table[Alt_K] := KeySy;
PibTerm_Command_Table[Alt_L] := LogSy;
PibTerm_Command_Table[Alt_M] := MuteSy;
PibTerm_Command_Table[Alt_N] := FastCSy;
PibTerm_Command_Table[Alt_O] := CaptureSy;
PibTerm_Command_Table[Alt_P] := ParamSy;
PibTerm_Command_Table[Alt_Q] := RedialSy;
PibTerm_Command_Table[Alt_R] := ReceiveSy;
PibTerm_Command_Table[Alt_S] := SendSy;
PibTerm_Command_Table[Alt_T] := TranslateSy;
PibTerm_Command_Table[Alt_U] := SDumpSy;
PibTerm_Command_Table[Alt_V] := ViewSy;
PibTerm_Command_Table[Alt_W] := HostSy;
PibTerm_Command_Table[Alt_X] := QuitSy;
PibTerm_Command_Table[Alt_Y] := TimersSy;
PibTerm_Command_Table[Alt_Z] := AreaCodeSy;
PibTerm_Command_Table[U_Arrow] := KeySendSy;
PibTerm_Command_Table[Alt_U_Arrow] := KeySendSy;
PibTerm_Command_Table[Ctrl_U_Arrow] := KeySendSy;
PibTerm_Command_Table[L_Arrow] := KeySendSy;
PibTerm_Command_Table[Alt_L_Arrow] := KeySendSy;
PibTerm_Command_Table[Ctrl_L_Arrow] := KeySendSy;
PibTerm_Command_Table[R_Arrow] := KeySendSy;
PibTerm_Command_Table[Alt_R_Arrow] := KeySendSy;
PibTerm_Command_Table[Ctrl_R_Arrow] := KeySendSy;
PibTerm_Command_Table[D_Arrow] := KeySendSy;
PibTerm_Command_Table[Alt_D_Arrow] := KeySendSy;
PibTerm_Command_Table[Ctrl_D_Arrow] := KeySendSy;
PibTerm_Command_Table[Home] := KeySendSy;
PibTerm_Command_Table[Alt_Home] := KeySendSy;
PibTerm_Command_Table[Ctrl_Home] := KeySendSy;
PibTerm_Command_Table[PgUp] := KeySendSy;
PibTerm_Command_Table[Alt_PgUp] := KeySendSy;
PibTerm_Command_Table[Ctrl_PgUp] := KeySendSy;
PibTerm_Command_Table[End_Key] := KeySendSy;
PibTerm_Command_Table[Alt_End_Key] := KeySendSy;
PibTerm_Command_Table[Ctrl_End_Key] := KeySendSy;
PibTerm_Command_Table[PgDn] := KeySendSy;
PibTerm_Command_Table[Alt_PgDn] := KeySendSy;
PibTerm_Command_Table[Ctrl_PgDn] := KeySendSy;
PibTerm_Command_Table[Ins_Key] := KeySendSy;
PibTerm_Command_Table[Alt_Ins_Key] := KeySendSy;
PibTerm_Command_Table[Ctrl_Ins_Key] := KeySendSy;
PibTerm_Command_Table[Del_Key] := KeySendSy;
PibTerm_Command_Table[Alt_Del_Key] := KeySendSy;
PibTerm_Command_Table[Ctrl_Del_Key] := KeySendSy;
PibTerm_Command_Table[Kpd_Minus] := KeySendSy;
PibTerm_Command_Table[Alt_Kpd_Minus] := KeySendSy;
PibTerm_Command_Table[Ctrl_Kpd_Minus] := KeySendSy;
PibTerm_Command_Table[Kpd_Plus] := KeySendSy;
PibTerm_Command_Table[Alt_Kpd_Plus] := KeySendSy;
PibTerm_Command_Table[Ctrl_Kpd_Plus] := KeySendSy;
PibTerm_Command_Table[Kpd_5] := KeySendSy;
PibTerm_Command_Table[Alt_Kpd_5] := KeySendSy;
PibTerm_Command_Table[Ctrl_Kpd_5] := KeySendSy;
PibTerm_Command_Table[Alt_Enter] := KeySendSy;
PibTerm_Command_Table[Alt_BS] := KeySendSy;
PibTerm_Command_Table[PrtSc] := KeySendSy;
PibTerm_Command_Table[Alt_PrtSc] := KeySendSy;
PibTerm_Command_Table[Ctrl_PrtSc] := KeySendSy;
(* Initialize key names *)
FOR I := F1 TO F10 DO
BEGIN
PibTerm_Command_Table[I] := KeySendSy;
Key_Definitions[I].Name := 'F' + IToS( I - F1 + 1 );
END;
FOR I := Alt_F1 TO Alt_F10 DO
BEGIN
PibTerm_Command_Table[I] := KeySendSy;
Key_Definitions[I].Name := 'A' + IToS( I - Alt_F1 + 1 );
END;
FOR I := Shift_F1 TO Shift_F10 DO
BEGIN
PibTerm_Command_Table[I] := KeySendSy;
Key_Definitions[I].Name := 'S' + IToS( I - Shift_F1 + 1 );
END;
FOR I := Ctrl_F1 TO Ctrl_F10 DO
BEGIN
PibTerm_Command_Table[I] := KeySendSy;
Key_Definitions[I].Name := 'C' + IToS( I - Ctrl_F1 + 1 );
END;
FOR I := Alt_1 TO Alt_Equal DO
BEGIN
PibTerm_Command_Table[I] := KeySendSy;
Key_Definitions[I].Name := 'N'+ COPY( '1234567890-+', I - Alt_1 + 1, 1 );
END;
Key_Definitions[U_Arrow].Name := 'K8';
Key_Definitions[Alt_U_Arrow].Name := 'AK8';
Key_Definitions[Ctrl_U_Arrow].Name := 'CK8';
Key_Definitions[L_Arrow].Name := 'K4';
Key_Definitions[Alt_L_Arrow].Name := 'AK4';
Key_Definitions[Ctrl_L_Arrow].Name := 'CK4';
Key_Definitions[R_Arrow].Name := 'K6';
Key_Definitions[Alt_R_Arrow].Name := 'AK6';
Key_Definitions[Ctrl_R_Arrow].Name := 'CK6';
Key_Definitions[D_Arrow].Name := 'K2';
Key_Definitions[Alt_D_Arrow].Name := 'AK2';
Key_Definitions[Ctrl_D_Arrow].Name := 'CK2';
Key_Definitions[Home].Name := 'K7';
Key_Definitions[Alt_Home].Name := 'AK7';
Key_Definitions[Ctrl_Home].Name := 'CK7';
Key_Definitions[PgUp].Name := 'K9';
Key_Definitions[Alt_PgUp].Name := 'AK9';
Key_Definitions[Ctrl_PgUp].Name := 'CK9';
Key_Definitions[End_Key].Name := 'K1';
Key_Definitions[Alt_End_Key].Name := 'AK1';
Key_Definitions[Ctrl_End_Key].Name := 'CK1';
Key_Definitions[PgDn].Name := 'K3';
Key_Definitions[Alt_PgDn].Name := 'AK3';
Key_Definitions[Ctrl_PgDn].Name := 'CK3';
Key_Definitions[Ins_Key].Name := 'K0';
Key_Definitions[Alt_Ins_Key].Name := 'AK0';
Key_Definitions[Ctrl_Ins_Key].Name := 'CK0';
Key_Definitions[Del_Key].Name := 'K.';
Key_Definitions[Alt_Del_Key].Name := 'AK.';
Key_Definitions[Ctrl_Del_Key].Name := 'CK.';
Key_Definitions[Kpd_Minus].Name := 'K-';
Key_Definitions[Alt_Kpd_Minus].Name := 'AK-';
Key_Definitions[Ctrl_Kpd_Minus].Name := 'CK-';
Key_Definitions[Kpd_Plus].Name := 'K+';
Key_Definitions[Alt_Kpd_Plus].Name := 'AK+';
Key_Definitions[Ctrl_Kpd_Plus].Name := 'CK+';
Key_Definitions[Kpd_5].Name := 'K5';
Key_Definitions[Alt_Kpd_5].Name := 'AK5';
Key_Definitions[Ctrl_Kpd_5].Name := 'CK5';
Key_Definitions[Alt_Enter].Name := 'AEN';
Key_Definitions[Alt_BS].Name := 'ABS';
Key_Definitions[PrtSc].Name := 'PS';
Key_Definitions[Alt_PrtSc].Name := 'APS';
Key_Definitions[Ctrl_PrtSc].Name := 'CPS';
(* Initialize keypad indices *)
Keypad_Key_Index[U_Arrow] := 1;
Keypad_Key_Index[Alt_U_Arrow] := 14;
Keypad_Key_Index[Ctrl_U_Arrow] := 27;
Keypad_Key_Index[L_Arrow] := 2;
Keypad_Key_Index[Alt_L_Arrow] := 15;
Keypad_Key_Index[Ctrl_L_Arrow] := 28;
Keypad_Key_Index[R_Arrow] := 3;
Keypad_Key_Index[Alt_R_Arrow] := 16;
Keypad_Key_Index[Ctrl_R_Arrow] := 29;
Keypad_Key_Index[D_Arrow] := 4;
Keypad_Key_Index[Alt_D_Arrow] := 17;
Keypad_Key_Index[Ctrl_D_Arrow] := 30;
Keypad_Key_Index[Home] := 5;
Keypad_Key_Index[Alt_Home] := 18;
Keypad_Key_Index[Ctrl_Home] := 31;
Keypad_Key_Index[PgUp] := 6;
Keypad_Key_Index[Alt_PgUp] := 19;
Keypad_Key_Index[Ctrl_PgUp] := 32;
Keypad_Key_Index[End_Key] := 7;
Keypad_Key_Index[Alt_End_Key] := 20;
Keypad_Key_Index[Ctrl_End_Key] := 33;
Keypad_Key_Index[PgDn] := 8;
Keypad_Key_Index[Alt_PgDn] := 21;
Keypad_Key_Index[Ctrl_PgDn] := 34;
Keypad_Key_Index[Ins_Key] := 9;
Keypad_Key_Index[Alt_Ins_Key] := 22;
Keypad_Key_Index[Ctrl_Ins_Key] := 35;
Keypad_Key_Index[Del_Key] := 10;
Keypad_Key_Index[Alt_Del_Key] := 23;
Keypad_Key_Index[Ctrl_Del_Key] := 36;
Keypad_Key_Index[Kpd_Minus] := 11;
Keypad_Key_Index[Alt_Kpd_Minus] := 24;
Keypad_Key_Index[Ctrl_Kpd_Minus] := 37;
Keypad_Key_Index[Kpd_Plus] := 12;
Keypad_Key_Index[Alt_Kpd_Plus] := 25;
Keypad_Key_Index[Ctrl_Kpd_Plus] := 38;
Keypad_Key_Index[Kpd_5] := 13;
Keypad_Key_Index[Alt_Kpd_5] := 26;
Keypad_Key_Index[Ctrl_Kpd_5] := 39;
(* Initialize Kermit variables *)
(* Timeout value *)
Kermit_Timeout := 5;
(* Default checksum method is 3-char CRC *)
Kermit_Chk_Type := '3';
(* Marks repeated data *)
Kermit_Repeat_Char := '~';
(* But repeating not default *)
Repeating := FALSE;
(* Half-duplex handshake character *)
Kermit_Handshake_Char := ' ';
(* Time to wait before send in host mode *)
Kermit_Delay_Time := 15;
(* Initial packet size *)
Kermit_Init_Packet_Size := 90;
Kermit_Packet_Size := 90;
(* Padding not required *)
Kermit_Npad := 0;
Kermit_Pad_Char := CHR( 0 );
(* Don't send padding unless requested *)
My_Pad_Num := 0;
(* CR is initial EOL *)
Kermit_EOL := CHR( CR );
(* Send a CR to start with *)
Send_EOL := CR;
(* Use the default quote *)
Kermit_Quote_Char := '#';
(* Use the default 8 bit quote *)
Kermit_Quote_8_Char := '&';
(* But don't ask for it unless binary with parity *)
Quoting := FALSE;
(* SOH is default header character *)
Kermit_Header_Char := CHR( SOH );
(* Kermit sliding window queue size *)
Kermit_Window_Size := 16;
(* Neither ascii not binary specified *)
Kermit_File_Type_Var := Kermit_None;
(* Assume maximum packet length *)
Kermit_Extended_Block := MaxLongPacketLength;
(* Editor name *)
Editor_Name := '';
(* Browser name *)
Browser_Name := '';
(* No dialing changes *)
Any_Dialing_Changes := FALSE;
(* No printer setup string *)
Printer_Setup := '';
(* No list dial in effect *)
N_Dial_Nos := 0;
I_Dial_Nos := 0;
(* No answerback message *)
VT100_Answerback_Message := '';
(* Throw away aborted download files *)
Evict_Partial_Trans := FALSE;
(* Use DOS EXEC function for jumps *)
Use_Dos_Exec_In_Jump := TRUE;
(* Ascii transfer stuff *)
Ascii_Use_CtrlZ := FALSE;
Ascii_Show_Text := TRUE;
Ascii_Send_Blank := FALSE;
Ascii_Send_Asis := FALSE;
Ascii_Line_Delay := 0;
Ascii_Char_Delay := 0;
Ascii_Line_Size := 255;
Ascii_Pacing_Char := CHR( 0 );
Ascii_CR_LF_String := CHR( CR );
Ascii_Translate := TRUE;
(* Don't allow extended keypad by default *)
Extended_Keypad := FALSE;
(* Define menu box characters *)
WITH Menu_Box_Chars DO
BEGIN
Top_Left_Corner := '╒';
Top_Line := '═';
Top_Right_Corner := '╕';
Right_Line := '│';
Bottom_Right_Corner := '╛';
Bottom_Line := '═';
Bottom_Left_Corner := '╘';
Left_Line := '│';
END;
(* Start out in menu mode only *)
Command_Key := 0;
Command_Key_Name := '';
Command_Key_Text := '';
Use_Prev_Key_Text := FALSE;
(* Attended mode by default *)
Attended_Mode := TRUE;
(* Insert mode by default *)
Edit_Insert_Mode := TRUE;
(* Transfer not from script *)
Script_Transfer := FALSE;
(* No status line name to start *)
Status_Line_Name := '';
Short_Terminal_Name := '';
(* Xmodem stuff *)
Xmodem_Char_Wait := 1;
Xmodem_Block_Wait := 10;
Xmodem_Ack_Wait := 10;
Xmodem_Max_Errors := 20;
(* Load function keys automatically *)
Auto_Load_FunKeys := TRUE;
(* Don't use DOS input by default *)
Use_Dos_Buffer_In := FALSE;
(* CTTY device driver prefix/root name *)
Host_CTTY_Device := 'COM';
(* Set terminal names, types lists *)
FOR I := 0 TO NumberTerminalTypes DO
BEGIN
Terminal_Type_List[I] := Terminal_Type_List_2[I];
Terminal_Name_List[I] := Terminal_Name_List_2[I];
END;
(* Debugging in Kermit *)
Kermit_Debug := Command_Debug_Mode;
(* General debug mode *)
Debug_Mode := Command_Debug_Mode;
(* Configuration file name *)
Config_File_Name := Command_Config_File_Name;
(* Dialing directory file name *)
Dialing_File_Name := Command_Dialing_File_Name;
(* Function key file name *)
Function_Key_Name := Command_Function_Key_Name;
(* Dialing prefix file name *)
Prefix_File_Name := Command_Prefix_File_Name;
(* Translate table file name *)
Translate_File_Name := Command_Translate_File_Name;
(* Log file name *)
Log_File_Name := Command_Log_File_Name;
(* Use DOS console output in dumb term *)
Use_Dos_Con_Output := FALSE;
(* Don't automatically unload scripts *)
Auto_Unload_Scripts := FALSE;
(* No currently executing scripts *)
Current_Script_Num := 0;
(* No script tests to start with *)
Do_Script_Tests := FALSE;
(* Not dialing attached script *)
Script_Dialed := FALSE;
(* No script files active *)
Script_File_Count := 0;
(* Allocate keyboard/consol file *)
Script_File_Used[0] := TRUE;
NEW( Script_File_List[0] );
WITH Script_File_List[0]^ DO
BEGIN
ReadOnly := FALSE;
EOF_Seen := FALSE;
Opened := TRUE;
END;
(* Other files not used yet *)
FOR I := 1 TO MaxScriptOpenFiles DO
Script_File_Used[I] := FALSE;
(* Set terminal mode stuff *)
Graphics_Mode := FALSE;
Alt_KeyPad_Mode := FALSE;
Hold_Screen_Mode := FALSE;
Reset_Requested := FALSE;
Auto_Print_Mode := FALSE;
Printer_Ctrl_Mode := FALSE;
Escape_Mode := FALSE;
Ansi_Last_Line := Max_Screen_Line;
FillChar( Line_Attributes, 100, 0 );
(* Remember current colors *)
New_ForeGround_Color := ForeGround_Color;
New_BackGround_Color := BackGround_Color;
New_Menu_Text_Color := Menu_Text_Color;
New_Menu_Title_Color := Menu_Title_Color;
New_Menu_Text_Color_2 := Menu_Text_Color_2;
New_Menu_Frame_Color := Menu_Frame_Color;
New_Border_Color := Border_Color;
(* Remember current text mode *)
New_Text_Mode := Text_Mode;
(* Keyboard not locked *)
Keyboard_Locked := FALSE;
(* Find file names *)
Auto_Find_FileNames := TRUE;
(* No keyboard input yet *)
Keyboard_Line := '';
Keyboard_Line_Pos := 0;
(* Don't prompt each file in Rlink *)
Rlink_Prompt_Each := FALSE;
(* Not a graphics terminal *)
Graphics_Terminal_Mode := FALSE;
(* Cursor is underline and blinks *)
Cursor_Underline := TRUE;
Cursor_Blink := TRUE;
(* Don't do automatic cursor key *)
(* redefinitions in VT100 mode *)
Auto_Change_Arrows := FALSE;
(* Don't strip high bits in terminal mode *)
Auto_Strip_High_Bit := FALSE;
(* Zmodem block size = 256 by default *)
Zmodem_BlockSize := 256;
(* Menu depth = 0 at this point *)
Menu_Depth := 0;
(* Set transfer types and names *)
FOR I := 1 TO Max_Transfer_Types DO
BEGIN
Transfers[I] := DTransfers[I];
Transfer_Name_List[I] := DTransfer_Name_List[I];
Trans_Type_Name[Transfers[I]] := DTrans_Type_Name[Transfers[I]];
Single_File_Protocol[Transfers[I]] := FALSE;
Send_Script_Names[Transfers[I]] := '';
Receive_Script_Names[Transfers[I]] := '';
Trans_OK_In_Host[Transfers[I]] := TRUE;
END;
(* Default script names for Zmodem *)
Send_Script_Names [Zmodem] := 'SENDZMOD';
Receive_Script_Names[Zmodem] := 'RECZMOD';
(* Default script names for YTerm *)
Send_Script_Names [YTerm] := 'SENDYTER';
Receive_Script_Names[YTerm] := 'RECYTERM';
(* Default script names for Rlink *)
Send_Script_Names [Rlink] := 'SENDRLIN';
Receive_Script_Names[Rlink] := 'RECRLINK';
(* Mark protocols which send 1 file only *)
Single_File_Protocol[ WXmodem ] := TRUE;
Single_File_Protocol[ Xmodem_Chk ] := TRUE;
Single_File_Protocol[ Xmodem_Crc ] := TRUE;
Single_File_Protocol[ Ascii ] := TRUE;
Single_File_Protocol[ Xmodem_1K ] := TRUE;
Single_File_Protocol[ Xmodem_1KG ] := TRUE;
(* Don't allow YTerm, SEALink in host mode *)
Trans_OK_In_Host[ YTerm ] := FALSE;
Trans_OK_In_Host[ SEALink ] := FALSE;
(* Use ordinary BIOS scroll by default *)
Software_Scroll := FALSE;
Software_Scroll_Par := FALSE;
Video_Handler_Installed := FALSE;
(* Assume no carrier to start *)
Current_Carrier_Status := FALSE;
New_Carrier_Status := FALSE;
Carrier_Dropped := FALSE;
(* Define function key indices *)
MOVE( Def_Funk_Bases, Funk_Bases, 4 );
MOVE( Def_Keypad_Nos, Keypad_Nos, 13 );
MOVE( Def_Number_Nos, Number_Nos, 13 );
MOVE( Def_Ctrl_Keys , Ctrl_Keys , 13 );
MOVE( Def_Misc_Keys , Misc_Keys , No_Misc_Keys );
(* Send upper case only is false *)
Send_Upper_Case_Only := FALSE;
(* Log file not open *)
Log_File_Open := FALSE;
(* Start with logging turned off. *)
Logging_On := FALSE;
(* Initialize display actions and *)
(* character sets. *)
FOR I := 1 TO MaxDisplayStates DO
Display_Action_Ptr[I] := NIL;
FOR I := 1 TO MaxDisplayCharSets DO
Display_Char_Set_Ptr[I] := NIL;
NEW( Display_Action_Ptr[1] );
NEW( Display_Char_Set_Ptr[1] );
NEW( Display_Char_Set_Ptr[2] );
END (* Set_Defaults *);